package top.purity.server.user.feign.input;

import top.purity.framework.common.GlobalConstant;
import top.purity.server.user.feign.input.dto.TenantInfoDTO;
import top.purity.server.user.feign.output.dto.PermissionDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Set;

/**
 * @version 1.0
 * @Author Lmh
 * @Description
 * @CreateTime 2023-09-24 20:28
 */

@FeignClient(value = "tenant", contextId = "tenant", path = "/tenant")
public interface TenantFeign {

    String PREFIX = GlobalConstant.RPC_PREFIX + "/tenant";

    @PostMapping(PREFIX + "/getByCode/{code}")
    TenantInfoDTO getByCode(@PathVariable("code") String code);

    @PostMapping(PREFIX + "/getMenuListByIds")
    List<PermissionDTO> getMenuListByIds(@RequestBody Set<Long> ids);
}
